package com.ikangtai.shecare.common.baseView.recordButtonView;

import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.View;
import com.ikangtai.shecare.R;

/**
 * Created by Administrator on 2016/1/20.
 */
public class RecordSelectBBTButton extends RecordSelectButton{

    private Context context;
    public static final int RECORD_BBT_SELECT_WHITE_BACKGROUND_COLOR = 0;
    public static final int RECORD_BBT_SELECT_BLUE_BACKGROUND_COLOR = 1;
    public static final String RecordSelectBBTButtonType="BBT";

    public RecordSelectBBTButton(Context context){
        super(context);
        this.context=context;
        setType(RecordSelectBBTButtonType);
    }
    public RecordSelectBBTButton(Context context,AttributeSet attrs){
        super(context,attrs);
        this.context=context;
       this.backgroundColor = RECORD_BBT_SELECT_WHITE_BACKGROUND_COLOR;
    }

    @Override
    public void setColor(int backGroundColor) {
        super.setColor(backGroundColor);
        if(backGroundColor == RECORD_BBT_SELECT_WHITE_BACKGROUND_COLOR){
           this.setBackground(getResources().getDrawable(R.drawable.record_temperature_button_default));
        }else if(backGroundColor == RECORD_BBT_SELECT_BLUE_BACKGROUND_COLOR){
            this.setBackground(getResources().getDrawable(R.drawable.record_temperature_button_pressed));
        }
    }

    @Override
    public void clickAction(View view) {

    }

}
